import request from '@/utils/request'
// import request from "@/utils/request"

// 获取所有的商品
export async function getGoods(params){
    let res = await request({
        url:"/goods",
        method:"get",
        params
    })
    return res
}
// 删除 商品
export async function delGoods(id){
    return await request({
        url:"/goods/" + id,
        method:"delete",
    })
}
// 添加商品 
export async function addGoods(params){
    let res = await request({
        url:"/goods",
        method:"post",
        data:params
    })
    return res
}
// export async function getGoodsList(params){
//     let res = await request({
//         url:"/categories",
//         method:"get",
//         params
//     })
//     return res
// }

// 获取 数据统计 先写到这
export async function getReportsList(){
    let res = await request({
        url:"reports/type/1",
        method:"get",
        // data:params
    })
    return res
}